<?php
$this->breadcrumbs = array(
	UserModule::t('Мои фирмы') => array('/user/myfirms'),
	GxHtml::valueEx($model) => array('/user/myfirms/update', 'id' => $model->id),
	UserModule::t('Изменение пакета')
);
?>

<h1><?php echo UserModule::t('Изменение пакета для') . ' ' . GxHtml::encode($model->title); ?></h1>
<?php
if(1 != Yii::app()->user->approved) {
	$this->renderPartial('/default/notapproved', array());
} else {
	$form = $this->beginWidget('GxActiveForm', 
		array(
			'id' => 'firms-form-change-plan',
			'enableAjaxValidation' => false,
			'htmlOptions'=>array(
				'enctype' => 'multipart/form-data',
				'class'=>'form-horizontal',
			),
		));
?>
	<?php if(Yii::app()->user->hasFlash('user_myfirms_msg')): ?>
	<p class="text-success"><?php echo Yii::app()->user->getFlash('user_myfirms_msg'); ?></p>
	<?php endif; ?>

	<div class="control-group">
		<p class="text-info"><?php echo UserModule::t('Текущий пакет: ') . GxHtml::encode($model->firmTmpl->title); ?></p>
	</div>
	<?php echo $form->hiddenField($model,'id'); ?>
	<div class="control-group">
		<?php echo $form->labelEx($model,UserModule::t('Новый пакет'),array('class'=>'control-label')); ?>
		<div class="controls">
			<?php echo $form->dropDownList($model, 'firm_tmpl_id', GxHtml::listDataEx(FirmTmpls::model()->findAllAttributes(null, true, 'hidden=0'))); ?>
			<span class="help-inline"><?php echo $form->error($model,'firm_tmpl_id'); ?></span>
		</div>
	</div>

	<div class="control-group">
		<div class="controls">
			<?php echo GxHtml::submitButton(UserModule::t('Сохранить'), array('class'=>'btn')); ?>
		</div>
	</div>
	<?php $this->endWidget(); ?>

<?php } ?>


